home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Herois / Codigo.Cst / 00201_Script_MM Missao Brilho < prev    next >
Text File  |  1999-03-19  |  2KB  |  54 lines

  1. property spr, posIni, posFim, cronoIni, tempoTotal
  2. property sprLinha, posIniLinha
  3. property sprBranco
  4.  
  5. on beginSprite me
  6.   set spr = 17
  7.   set cronoIni = the timer
  8.   set tempoTotal = 600 * 60
  9.   set posIni = the locH of sprite spr
  10.   set posFim = 640
  11.   set sprLinha = 13
  12.   set posIniLinha = the locH of sprite sprLinha
  13.   set sprBranco = 120
  14. end
  15.  
  16. on idleSprite me
  17.   set x = the locH of sprite spr
  18.   set nx = (the timer - cronoIni) * (posFim - posIni) / tempoTotal + posIni
  19.   if nx <> x then
  20.     global gMustUpdate
  21.     set gMustUpdate = true
  22.     set the locH of sprite spr = nx
  23.     set the locH of sprite sprLinha = nx - posIni + posIniLinha
  24.     if nx >= posFim then
  25.       updateStage
  26.       set the member of sprite 120 to member "BrancoExplosao"
  27.       set the rect of sprite 120 to rect(0,0,640,480)
  28.       set the foreColor of sprite 120 to (the backColor of member "FundoBranco") -- white
  29.       puppetSprite 120,true
  30.       set cronoIni = the timer
  31.       if the colorDepth > 80 then
  32.         set the ink of sprite 120 to 32
  33.         repeat while the timer - cronoIni < 80
  34.           set the blend of sprite sprBranco to (the timer - cronoIni)*100 /60
  35.           set the visibility of sprite sprBranco to true
  36.           updateStage
  37.         end repeat
  38.         set the blend of sprite sprBranco to 100
  39.         updateStage
  40.       else
  41.         repeat while the timer - cronoIni < 80
  42.           if random(2) = 1 then
  43.             set the visibility of sprite sprBranco to true
  44.           else 
  45.             set the visibility of sprite sprBranco to false
  46.           end if
  47.           updateStage
  48.         end repeat
  49.       end if
  50.       -- Acaba de explodir e sai ...
  51.       quit
  52.     end if
  53.   end if
  54. end